import { createBrowserRouter } from "react-router-dom";
import Article from "../pages/Article/Article";
import Detail from "../pages/Detail/Detail";
import Home from "../pages/Home/Home";
import Layouts from "../Layouts/Layouts";
import Login from "../pages/Login/Login";

export const routerlist=[
    {
        path:"/home",
        element:<Home/>,
        meta:{title:"首页"}
    },
    {
        path:"/article",
        element:<Article/>,
        meta:{title:"文章列表"}
    },
    {
        path:"/detail/:id",
        element:<Detail/>,
        meta:{title:"文章详情"}
    }
]

const router=createBrowserRouter([
    {
        path:"/",
        element:<Layouts/>,
        children:routerlist
    },
    {
        path:"/login",
        element:<Login/>,
    }
    
    
])

export default router;